<template>
  <div class="info-panel">
    <div class="info-content">
      <div class="info-item">
        <span class="info-label">论文名：</span>
        <span class="info-value">{{ info.title || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">刊物名称：</span>
        <span class="info-value">{{ info.journalName || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">收录检索：</span>
        <span class="info-value">{{ info.indexing || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">发表时间：</span>
        <span class="info-value">{{ info.publishDate || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">起止页码：</span>
        <span class="info-value">{{ info.pageRange || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">本人排名：</span>
        <span class="info-value">{{ info.authorRank || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">通讯作者：</span>
        <span class="info-value">{{ info.correspondingAuthor ? '是' : '否' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">影响因子：</span>
        <span class="info-value">{{ info.impactFactor || '0' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">DOI号：</span>
        <span class="info-value">{{ info.doi || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">引用次数：</span>
        <span class="info-value">{{ info.citationCount || '0' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">论文类型：</span>
        <span class="info-value">{{ info.paperType || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">自然指数杂志：</span>
        <span class="info-value">{{ info.naturalIndex ? '是' : '否' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">关键词：</span>
        <span class="info-value">{{ info.keywords || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">共同一作：</span>
        <span class="info-value">{{ info.coFirstAuthor ? '是' : '否' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">独著：</span>
        <span class="info-value">{{ info.soleAuthor ? '是' : '否' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">ISSN：</span>
        <span class="info-value">{{ info.issn || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">CN号：</span>
        <span class="info-value">{{ info.cnNumber || '暂无' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">2018被引：</span>
        <span class="info-value">{{ info.citations2018 || '0' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">2017被引：</span>
        <span class="info-value">{{ info.citations2017 || '0' }}</span>
      </div>
      <div class="info-item">
        <span class="info-label">2016被引：</span>
        <span class="info-value">{{ info.citations2016 || '0' }}</span>
      </div>
    </div>
  </div>
</template>

<script setup>
// 使用 defineProps 定义 props
const props = defineProps({
  info: {
    type: Object,
    default: () => ({})
  }
})
</script>

<style scoped>
.info-panel {
  height: 100%;
}

.info-content {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.info-item {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: #9aa0a6;
  font-weight: 500;
}

.info-value {
  font-size: 13px;
  color: #e8eaed;
  word-break: break-all;
  line-height: 1.4;
}

.info-content::-webkit-scrollbar {
  width: 8px;
}

.info-content::-webkit-scrollbar-track {
  background: #323639;
}

.info-content::-webkit-scrollbar-thumb {
  background: #5f6368;
  border-radius: 4px;
}

.info-content::-webkit-scrollbar-thumb:hover {
  background: #80868b;
}
</style>
